import React from 'react';
import ReactDOM from 'react-dom';

const App = React.createClass({
    render() {
        return <div onClick={this.props.onClick}>{this.props.location}</div>
    }
});

function appClicked() {
    console.log('appClicked');
}

ReactDOM.render(<App location="xian" onClick={appClicked}/>, document.body);